<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width,  initial-scale=1.0, user-scalable=0, minimum-scale=1.0,  maximum-scale=1.0" />
    <meta content="yes" name="apple-mobile-web-app-capable" />
    <meta content="black" name="apple-mobile-web-app-status-bar-style" />
    <meta content="telephone=no" name="format-detection" />
    <title>我的草稿箱</title>
    <link rel="stylesheet" href="__PUBLIC__/css/style.css" media="screen" type="text/css" />
    <link rel="stylesheet" href="__PUBLIC__/css/public.css" type="text/css">
    <link rel="stylesheet" type="text/css" href="__PUBLIC__/css/font-awesome.min.css"/>
    <link rel='stylesheet' href='__PUBLIC__/css/bootstrap.css' type='text/css' media='all' />
    <script type='text/javascript' src='__PUBLIC__/js/jquery-2.1.1.min.js'></script>
    <script type='text/javascript' src='__PUBLIC__/js/bootstrap.js'></script>
</head>
<script type="text/javascript">
function publish(){
    if(confirm("确定要发布吗？")){
        return true;
    }
    else{
        return false;
    }
}

function del(){
    if(confirm("确定要删除吗？")){
        return true;
    }
    else{
        return false;
    }
}
</script>
<body>
    <div class="container">
            <include file='Common:header'/>
        <div class="cgx-txt">
            <h1><i class="fa fa-list-ul"></i>我的草稿箱</h1>
            <div class="cgx-sbox">
                <ul class="cgx-txt-box clearfix">
                <foreach name='blog' item='v' key='i'>
                    <li>
                        <div class="cgx-sbox-top">
                            <h2><?php echo $i+1; ?></h2>
                            <a href="{:U('/Home/Blog/edit', array('id' => $v['id']))}"><p class="cgx-top-p">{$v.title}</p></a>
                            <span class="cgx-top-btn">
                            <span class="cgx-dra-btn">
                                <a href="{:U('/Home/Blog/publish', array('id' => $v['id']))}" onclick='return publish();'><i class="fa fa-check"></i> 发 布</a>
                            </span>
                            <span class="cgx-dra-btn dra-right">
                                <a href="{:U('/Home/Blog/look', array('id' => $v['id']))}"><i class="fa dar-eye fa-eye"></i> 预 览</a>
                            </span>
                            </span>
                        </div>
                        <div class="cgx-sbox-bottom">
                            <p>
                            <span><i class="fa fa-user"></i><a href="{:U('/Home/User/look', array('id' => $v['uid']))}">{$v.author}</a></span>
                            <span class="blog-box-ico"><a href="{:U('/Home/Blog/edit', array('id' => $v['id']))}"><i class="fa fa-pencil"></i>编辑</a></span>
                            <span class="blog-box-ico"><a href="{:U('/Home/Blog/del', array('id' => $v['id']))}" onclick='return del();'><i class="fa fa-trash"></i>删除</a></span>
                            <span class="blog-box-ico"><i class="fa fa-clock-o"></i>{$v.time|date='Y-m-d', ###}</span>
                            </p>
                        </div>
                    </li>
                </foreach>
                </ul>
                    <div class="msg-page">
                        <div class="page">{$page}</div>
                    </div>
            </div>
        </div>
    </div>
    <script src="__PUBLIC__/js/index.js"></script>
</body>
</html>